#define _USE_MATH_DEFINES

#include <iostream>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <iomanip>
#include <random>
#include <ctime>

using namespace  std;

const double epsilon = 1e-9;

struct Point {
    double x, y;

    Point(double x = 0, double y = 0) : x(x), y(y) {};

    Point operator - (const Point& p) const {
        return Point(x - p.x, y - p.y);
    }

    double cross(const Point& p) const {
        return x * p.y - y * p.x;
    }

};

double RandomDouble(double min, double max);

double Distance(Point a,Point b);

Point Midpoint(Point p1,Point p2);

Point ReflectPoint(Point p3,Point mid);
